package com.codbking.calendar.exaple.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.codbking.calendar.exaple.TodayWork;
import com.codbking.calendar.exaple.PayInfoBean;

import com.codbking.calendar.exaple.greendao.gen.TodayWorkDao;
import com.codbking.calendar.exaple.greendao.gen.PayInfoBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig todayWorkDaoConfig;
    private final DaoConfig payInfoBeanDaoConfig;

    private final TodayWorkDao todayWorkDao;
    private final PayInfoBeanDao payInfoBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        todayWorkDaoConfig = daoConfigMap.get(TodayWorkDao.class).clone();
        todayWorkDaoConfig.initIdentityScope(type);

        payInfoBeanDaoConfig = daoConfigMap.get(PayInfoBeanDao.class).clone();
        payInfoBeanDaoConfig.initIdentityScope(type);

        todayWorkDao = new TodayWorkDao(todayWorkDaoConfig, this);
        payInfoBeanDao = new PayInfoBeanDao(payInfoBeanDaoConfig, this);

        registerDao(TodayWork.class, todayWorkDao);
        registerDao(PayInfoBean.class, payInfoBeanDao);
    }
    
    public void clear() {
        todayWorkDaoConfig.clearIdentityScope();
        payInfoBeanDaoConfig.clearIdentityScope();
    }

    public TodayWorkDao getTodayWorkDao() {
        return todayWorkDao;
    }

    public PayInfoBeanDao getPayInfoBeanDao() {
        return payInfoBeanDao;
    }

}
